/*
 * SplashWindow.cs - Wordtrainer
 * 
 * Copyright (C) 1998-2007 Markus Kilås
 *               
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 *
 * Authors:
 *   Markus Kilås <markus@markuspage.com>
 * 
 */

using System;
using System.Reflection;
using Gtk;

namespace Wordtrainer
{
	
	
	public partial class SplashWindow : Gtk.Window
	{
		
		private Gdk.Pixbuf bitmap;
		
		public SplashWindow() : 
				base(Gtk.WindowType.Toplevel)
		{
			this.Build();
			bitmap = new Gdk.Pixbuf(Assembly.GetCallingAssembly(), "splashscreen.png");
			this.Resize(bitmap.Width, bitmap.Height);
			AppPaintable = true;
		}
		
		protected override bool OnExposeEvent (Gdk.EventExpose evt)
		{
			Gdk.GC gc = Style.LightGC (StateType.Normal);
			GdkWindow.DrawPixbuf (gc, bitmap, 0, 0, 0, 0, bitmap.Width, bitmap.Height, Gdk.RgbDither.None, 0, 0);
			return base.OnExposeEvent (evt);
		}
	}
}
